package kind;

import java.util.Random;

public class Dddd {

        public static void main(String[] args) {
            int[] arr = new int[10];
            Random random = new Random();
            int sum = 0;


            for (int i = 0; i < arr.length; i++) {
                arr[i] = random.nextInt(100) + 1;
                sum += arr[i];
            }


            double average = (double) sum / arr.length;


            System.out.print("数组元素：");
            for (int num : arr) {
                System.out.print(num + " ");
            }
            System.out.println("\n平均值：" + average);
        }
    }

